package com.student.controller;


import com.student.dto.ResponseDto;
import com.student.service.PhMenuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @BelongsProject: public_house
 * @BelongsPackage: com.cykj.controller
 * @Author: 小徐
 * @CreateTime: 2024-11-06 15:58
 * @Description: TODO
 * @Version: 1.0
 */
@RestController
@RequestMapping("menu")
public class PhMenuController {
    @Autowired
    private PhMenuService phMenuService;
    @GetMapping("getMenu")
    public ResponseDto getMenu(@RequestParam("roleId") Integer roleId){
        System.out.println(roleId);

        return phMenuService.getMenu(roleId);
    }

    //    查询已分配的菜单
    @GetMapping("getAssignedMeun")
    @CrossOrigin
    public ResponseDto getAssignedMeun(@RequestParam("roleId") Integer roleId) {


        return phMenuService.getAssignedMeun(roleId);
    }


}